<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName"
	value="${message(code: "question.${params.qtype}.label", default: 'Question')}" />
<g:set var="questiontype" value="${params['qtype']}" />
<title><g:message code="default.create.label"
		args="[entityName]" /></title>
</head>
<body>
	<div class="row">
		<g:set var="vhref"
			value="${createLink(action: 'index', params: [qtype: questiontype]) }" />
		<g:set var="vtitle"
			value="${message(code: 'default.list.label', args: [entityName]) }" />
		<g:render template="/shared/navbar"
			model="[links: [[href: vhref, title: vtitle]]]"></g:render>
	</div>
	<div class="row" role="main">
		<h1 class="text-center">
			<g:message code="default.create.label" args="[entityName]" />
		</h1>
		<g:if test="${flash.message}">
			<div class="message" role="status">
				${flash.message}
			</div>
		</g:if>
		<g:hasErrors bean="${questionInstance}">
			<ul class="errors" role="alert">
				<g:eachError bean="${questionInstance}" var="error">
					<li
						<g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message
							error="${error}" /></li>
				</g:eachError>
			</ul>
		</g:hasErrors>
	</div>
	<div class="row">
		<div class="col-md-offset-3 col-md-6">
			<g:form url="[resource:questionInstance, action:'save']"
				class="form-horizontal">
				<g:render template="form" />
				<div class="form-group">
					<div class="col-md-offset-3 col-md-4">
					<g:submitButton name="create" class="btn btn-primary btn-block"
						value="${message(code: 'default.button.create.label', default: 'Create')}" />
					</div>
				</div>
			</g:form>
		</div>
	</div>
</body>
</html>
